﻿@inherits BaseComponent
@if ( !HasCustomRegistration )
{
    <CascadingValue Value=this>
        <CascadingValue Value="@store">
            @if ( TabPosition == TabPosition.Top )
            {
                @if ( Items != null )
                {
                    <ul class="@ClassNames" style="@StyleNames" @attributes="@Attributes">
                        @Items
                    </ul>
                }
                @if ( Content != null )
                {
                    <div class="@ContentClassNames" @attributes="@Attributes">
                        @Content
                    </div>
                }
            }
            else if ( TabPosition == TabPosition.Bottom )
            {
                @if ( Content != null )
                {
                    <div class="@ContentClassNames" @attributes="@Attributes">
                        @Content
                    </div>
                }
                @if ( Items != null )
                {
                    <ul class="@ClassNames" style="@StyleNames" @attributes="@Attributes">
                        @Items
                    </ul>
                }
            }
            else if ( TabPosition == TabPosition.Left )
            {
                <Row>
                    <Column ColumnSize="ColumnSize.IsAuto">
                        @if ( Items != null )
                        {
                            <ul class="@ClassNames" style="@StyleNames" @attributes="@Attributes">
                                @Items
                            </ul>
                        }
                    </Column>
                    <Column>
                        @if ( Content != null )
                        {
                            <div class="@ContentClassNames" @attributes="@Attributes">
                                @Content
                            </div>
                        }
                    </Column>
                </Row>
            }
            else if ( TabPosition == TabPosition.Right )
            {
                <Row>
                    <Column>
                        @if ( Content != null )
                        {
                            <div class="@ContentClassNames" @attributes="@Attributes">
                                @Content
                            </div>
                        }
                    </Column>
                    <Column ColumnSize="ColumnSize.IsAuto">
                        @if ( Items != null )
                        {
                            <ul class="@ClassNames" style="@StyleNames" @attributes="@Attributes">
                                @Items
                            </ul>
                        }
                    </Column>
                </Row>
            }
        </CascadingValue>
    </CascadingValue>
}
else
{
    @RenderCustomComponent()
}